﻿
namespace AMM.Forms.Reports.ReportUserControls {
    public partial class ProductStoreReportSearchControl : BaseReportSearchControl {

        public override string ReportName {
            get { return "ProductStoreReport.rdlc"; }
        }

        public override object CrossedThreadOperation() {
            string productCodeS = this.tbProductCode.Text;
            string storeBasisCodeS = this.tbStoreBasisCode.Text;
            string quantityStartS = this.tbQuantityStart.Text;
            string quantityEndS = this.tbQuantityEnd.Text;

            decimal? quantityStart = quantityStartS.ToDecimal();
            decimal? quantityEnd = quantityEndS.ToDecimal();

            return this._reportProcessor.GetProductStoreViewList(productCodeS, storeBasisCodeS, quantityStart, quantityEnd);
        }

        public override void ResetSearch() {
            this.tbProductCode.Clear();
            this.tbStoreBasisCode.Clear();
            this.tbQuantityStart.Clear();
            this.tbQuantityEnd.Clear();
        }

        public ProductStoreReportSearchControl() {
            this.InitializeComponent();
        }
    }
}
